package meterMonitor.util;

import javax.swing.*;
import java.awt.*;

public class ClassLoaderTest {

    public static void main(String[] args) {
        // JFrame frame = new ClassLoaderFrame();
        //
        // frame.setTitle("ClassLoaderTest");
        //
        // frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        //
        // frame.setVisible(true);
        //
        // frame.setContentPane(new Container());


        System.out.println(ClassLoaderTest.class.getClassLoader());
        System.out.println(ClassLoaderTest.class.getClassLoader().getParent());
        System.out.println(ClassLoaderTest.class.getClassLoader().getParent().getParent());

        System.out.println(ClassLoaderTest.class.getClassLoader().getClass().getClassLoader());

        System.out.println(String.class.getClass());
        System.out.println("1220".getClass().getClass().getClass());





    }
}

class ClassLoaderFrame extends JFrame {
    private JTextField keyField = new JTextField("3", 4);
    private JTextField nameField = new JTextField("Calculator", 4);
    private static final int DEFAULT_WIDTH = 300;
    private static final int DEFAULT_HEIGHT = 200;


    public ClassLoaderFrame() {
        setSize(DEFAULT_WIDTH, DEFAULT_HEIGHT);
        setLayout(new GridBagLayout());
    }
}
